From: Florian Eckert Date: Tue, 12 Apr 2022 12:11:36 +0000 (+0200) Subject: luci-mod-system: Set description to blank if the trigger has none X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=0c0cf782f3003e5f753befdf59d8fc19561ecbf8;p=project%2Fluci.git luci-mod-system: Set description to blank if the trigger has none In this case the cbi description div will not be generated and when switching to another trigger later, attempts to change the description div contents will fail. Signed-off-by: Florian Eckert (cherry picked from commit b6fb2b16971f80afcfb7c3dd1d257c60f6cced7f) --- diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js index c0cbd7a4f1..f34a9360c3 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js @@ -97,7 +97,7 @@ return view.extend({ for (var i = 0; i < plugins.length; i++) { var plugin = plugins[i]; if ( plugin.name === trigger) - this.description = plugin.form.description || ''; + this.description = plugin.form.description || ' '; } return trigger; };